<h2>Listing children</h2>

<table>
  <tr>
    <th>Name</th>
  </tr>
  
<% for child in @children %>
  <tr>
    <td><%=h child.name %></td>
    <td><%= link_to 'Edit', :action => 'edit', :id => child %></td>
    <td><%= link_to 'Delete', { :action => 'destroy', :id => child }, :confirm => 'Are you sure?', :method => :post %></td>
  </tr>
<% end %>
</table>

<%= link_to 'Previous page', { :page => @child_pages.current.previous } if @child_pages.current.previous %>
<%= link_to 'Next page', { :page => @child_pages.current.next } if @child_pages.current.next %> 

<br />

<%= link_to 'New child', :action => 'new' %>
